home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / docs / misc / ConcNews.lha / news / amiga.programming / comp.sys.amiga.programmer_10961_000070.msg < prev    next >
Encoding:
Text File  |  1994-11-27  |  1.7 KB  |  37 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: dd.chalmers.se!news.chalmers.se!sunic!EU.net!howland.reston.ans.net!xlink.net!rz.uni-karlsruhe.de!stepsun.uni-kl.de!uklirb.informatik.uni-kl.de!feck
  3. From: feck@informatik.uni-kl.de (Christoph Feck IRZ)
  4. Subject: Re: BOOPSI-Button with Key Support
  5. Message-ID: <1994May17.204200@informatik.uni-kl.de>
  6. Sender: news@uklirb.informatik.uni-kl.de (Unix-News-System)
  7. Nntp-Posting-Host: uklira.informatik.uni-kl.de
  8. Organization: University of Kaiserslautern, Germany
  9. References:  <inf01.769175363@apollo23>
  10. Date: Tue, 17 May 1994 18:42:00 GMT
  11. Lines: 24
  12.  
  13. In article <inf01.769175363@apollo23>, inf01@apollo23.uni-trier.de (Hans-Joerg Frieden) writes:
  14. > I just happened to be writing a program that needs some BOOSPI button
  15. > gadgets. I need them with the little underscore to mark a keyboard
  16. > shortcut, and they should be able to handle this by themselves.
  17.  
  18. Regarding keyboard input:  Intuition can only send input
  19. to a gadget that is going to be activated (GM_ACTIVE),
  20. or that is active and currently procssing input (GM_HANDLE).
  21. In other words, your gadget will never know that the
  22. user pressed a key unless you activated it yourself.
  23.  
  24. There are two solutions:  Have a master gadget, which
  25. you keep active (ActivateGadget() it whenever you get
  26. a IDCMP_GADGETUP or IDCMP_ACTIVEWINDOW) and which sends
  27. all keyboard events to all it's subgadgets (groupgclass
  28. will do this).
  29.  
  30. The other solution is to use IDCMP_RAWKEY (so that you
  31. can recieve KEYUP events) and activate the gadget
  32. associated with a given character yourself (MUI will
  33. do this :)
  34.  
  35. 3k// Christoph Feck, TowerSystems - BOOPSI Class Development
  36. \X/ Amiga - Intuition inside.
  37.